package com.photoeditor.demo.model.bean.face;

import android.os.Parcel;

/**
 * Created by @author winn on 2018/10/31.
 */

public class FaceAgingResultBean extends BaseFaceResultBean {

    public String key;//标示请求
    public String pic;//图片base64编码
    public String age;//年龄
    public int sex;//性别,0-男，1-女
    public String ethnicity;//种族,Asian,White,Black
    public String rectangle;//按top、left、width、height的顺序拼接而成的字符串，如"top,left,width,height"


    public FaceAgingResultBean() {
        super(REPORT_TYPE_FACE_AGING);
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeString(this.key);
        dest.writeString(this.pic);
        dest.writeString(this.age);
        dest.writeInt(this.sex);
        dest.writeString(this.ethnicity);
        dest.writeString(this.rectangle);
    }

    protected FaceAgingResultBean(Parcel in) {
        super(in);
        this.key = in.readString();
        this.pic = in.readString();
        this.age = in.readString();
        this.sex = in.readInt();
        this.ethnicity = in.readString();
        this.rectangle = in.readString();
    }

    public static final Creator<FaceAgingResultBean> CREATOR = new Creator<FaceAgingResultBean>() {
        @Override
        public FaceAgingResultBean createFromParcel(Parcel source) {
            return new FaceAgingResultBean(source);
        }

        @Override
        public FaceAgingResultBean[] newArray(int size) {
            return new FaceAgingResultBean[size];
        }
    };
}
